﻿using System;

namespace UtilZ.Dotnet.Ex.Model
{
    /// <summary>
    /// 地理三维坐标点
    /// </summary>
    public class GISPoint3
    {
        private double _lon = double.NaN;
        /// <summary>
        /// 经度,单位:°
        /// </summary>
        public double Lon
        {
            get { return this._lon; }
            set { this._lon = value; }
        }

        private double _lat = double.NaN;
        /// <summary>
        /// 维度,单位:°
        /// </summary>
        public double Lat
        {
            get { return this._lat; }
            set { this._lat = value; }
        }

        private double _alt = double.NaN;
        /// <summary>
        /// 高度,单位:米
        /// </summary>
        public double Alt
        {
            get { return this._alt; }
            set { this._alt = value; }
        }


        /// <summary>
        /// 默认构造函数初始化
        /// </summary>
        public GISPoint3()
        {

        }

        /// <summary>
        /// 构造函数初始化
        /// </summary>
        /// <param name="lon">经度,单位:°</param>
        /// <param name="lat">维度,单位:°</param>
        /// <param name="alt">高度,单位:米</param>
        public GISPoint3(double lon, double lat, double alt)
        {
            this._lon = lon;
            this._lat = lat;
            this._alt = alt;
        }



        /// <summary>
        /// 重写ToString
        /// </summary>
        /// <returns>String</returns>
        public override string ToString()
        {
            return $"经度:{this._lon}°,纬度:{this._lat}°,高度:{this._alt}米";
        }

    }
}
